package com.ac.app.web.action.pick;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.caac.core.web.action.BaseAction;
import com.caac.core.web.form.BaseForm;
import com.ac.app.dm.PickRecord;
import com.ac.app.web.form.PkRecordForm;

/**
 * <p>Title: </p>
 * <p>Description: </p>
 * <p>Copyright: Copyright AgileCentury 2008</p>
 * <p>Company: AgileCentury </p>
 * @author <a href="mailto:ac@agilecentury.com">Agile</a>
 * @version 1.0
 */

public class SavePkRecordAction extends BaseAction {
    protected ActionForward doExecute(ActionMapping mapping,
                                      BaseForm form,
                                      HttpServletRequest request,
                                      HttpServletResponse response)
            throws Exception {
        PkRecordForm myForm = (PkRecordForm) form;
        PickRecord dm = myForm.getPickRecord();
        dm.setPrjBegdate(myForm.getTime1());
        dm.setPrjEnddate(myForm.getTime2());
        
        this.getBaseManager().saveObject(dm);
        return forward(mapping);
    }
}
